/**
 * TetisDB
 *
 * Classe para busca, controla o Atributo do TetisQuery
 */

package br.com.tetisdb.query;

import br.com.tetisdb.lang.TetisObject;

public class Attribute extends TetisObject {
    //nome do atributo
    private String name;
    //constrain desse atributo
    private TetisQueryConstrain constrain;
    //valor da constraind
    private String value;
    
    /**
     * Construtor padrao
     *
     * @param name Nome do Atributo
     */
    public Attribute(String name) {
        this.setName(name);
    }
    
    /**
     * Metodo para adicionar Constrain no Atributo
     *
     * @param constrain TetisQueryConstrain a ser adicionada
     * @param value Valor da constrain
     */
    public void constrain(TetisQueryConstrain constrain, String value) {
        this.setConstrain(constrain);
        this.setValue(value);
    }

    protected String getName() {
        return name;
    }

    protected void setName(String name) {
        this.name = name;
    }

    protected TetisQueryConstrain getConstrain() {
        return constrain;
    }

    protected void setConstrain(TetisQueryConstrain constrain) {
        this.constrain = constrain;
    }

    protected String getValue() {
        return value;
    }

    protected void setValue(String value) {
        this.value = value;
    }
}
